home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / pcscheme / geneva / sources.exe / SOURCES / INLINE / SCRAMBLE.ASM < prev    next >
Encoding:
Assembly Source File  |  1992-11-21  |  422 b   |  26 lines

  1. IDEAL
  2. INCLUDE    "inline.ash"
  3. startinline    SCRAMBLE, 1
  4.     mov    bx, [reg1.disp]
  5.     call    ldpage C, [reg1.page]
  6.     mov    es, ax
  7.     cmp    [(STRDEF es:bx).tag], STRTYPE
  8.     jne    @@error
  9.     mov    cx, [(STRDEF es:bx).len]
  10.     sub    cx, OFFSET (TYPE STRDEF).buffer
  11.     jbe    @@end
  12. @@loop:
  13.     xor    [(STRDEF es:bx).buffer], 055h
  14.     inc    bx
  15.     loop    @@loop
  16. @@end:
  17.     ret
  18. @@error:
  19.     call    sound C, 440
  20.     mov    cx, 0
  21.     loop    $
  22.     call    nosound C
  23.     ret
  24. endinline
  25. END
  26.